/*
 * @Author: toString muzi_li0323@163.com
 * @Date: 2024-05-14 16:23:29
 * @LastEditors: toString muzi_li0323@163.com
 * @LastEditTime: 2024-05-23 19:18:43
 * @FilePath: /chain-link-api-front-admin/vite.config.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
import path from 'path'
// https://vitejs.dev/config/

export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src')  // 为./src配置别名
    }
  },
  // server: {
  //   host: '0.0.0.0',
  //   proxy: {
  //     '/api': {
  //       target: 'http://192.168.0.116:9999',
  //       changeOrigin: true,
  //       rewrite: (path) => path.replace(/^\/api/, '')
  //     }
  //   }
  // },
  // 混淆器 打包时移除 console.log、debugger
  build: {
    minify: 'terser',
    terserOptions: {
      compress: {
        drop_console: true,
        drop_debugger: true
      }
    }
  }
  })

// vite.config.ts
